/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pkl53.view;

import pkl53.component.TextField;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import pkl53.model.B1coba;

/**
 *
 * @author User
 */
public class Blok123 extends javax.swing.JPanel {

    private ArrayList<TextField> listTextFieldBlok123 = new ArrayList<TextField>();

    /**
     * Creates new form blok123
     */
    public Blok123() {
        initComponents();
        addListTextfield();
        KKS.setVisible(false);

    }
    public static B1coba getModel(){
        return b1coba1;
    }

    public List<TextField> getListTextFieldBlok123() {
        return listTextFieldBlok123;
    }

    public void addListTextfield() {
        getListTextFieldBlok123().add(0, getB1R1());
        getListTextFieldBlok123().add(1, getB1R2());
        getListTextFieldBlok123().add(2, getB1R3());
        getListTextFieldBlok123().add(3, getB1R4());
        getListTextFieldBlok123().add(4, getB1R5());
        getListTextFieldBlok123().add(5, getB1R6());
        getListTextFieldBlok123().add(6, getB1R7());
        getListTextFieldBlok123().add(7, getB1R8());
        getListTextFieldBlok123().add(8, getB1R9());
        getListTextFieldBlok123().add(9, getB1R10());
        getListTextFieldBlok123().add(10, getB2R1());
        getListTextFieldBlok123().add(11, getB2R2());
        getListTextFieldBlok123().add(12, getB3R1C1());
        getListTextFieldBlok123().add(13, getB3R1C2());
        getListTextFieldBlok123().add(14, getB3R2C1());
        getListTextFieldBlok123().add(15, getB3R2C2());
        getListTextFieldBlok123().add(16, getB3R3C1a());
        getListTextFieldBlok123().add(17, getB3R3C1b());
        getListTextFieldBlok123().add(18, getB3R3C2a());
        getListTextFieldBlok123().add(19, getB3R3C2b());
    }

    private EntityManager em;

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        b1coba1 = new pkl53.model.B1coba();
        blok1231 = new pkl53.imageClass.Blok123();
        jLayeredPane2 = new javax.swing.JLayeredPane();
        B1R1 = new pkl53.component.TextField();
        B1R2 = new pkl53.component.TextField();
        B1R3 = new pkl53.component.TextField();
        B1R4 = new pkl53.component.TextField();
        B1R5 = new pkl53.component.TextField();
        B1R6 = new pkl53.component.TextField();
        B1R7 = new pkl53.component.TextField();
        B1R8 = new pkl53.component.TextField();
        B1R9 = new pkl53.component.TextField();
        B1R10 = new pkl53.component.TextField();
        B2R1 = new pkl53.component.TextField();
        B2R2 = new pkl53.component.TextField();
        B3R1C1 = new pkl53.component.TextField();
        B3R1C2 = new pkl53.component.TextField();
        B3R2C1 = new pkl53.component.TextField();
        B3R2C2 = new pkl53.component.TextField();
        B3R3C1a = new pkl53.component.TextField();
        B3R3C1b = new pkl53.component.TextField();
        B3R3C2a = new pkl53.component.TextField();
        B3R3C2b = new pkl53.component.TextField();
        KKS = new pkl53.component.TextField();

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R1, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r1"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R2, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r2"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R3, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r3"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R4, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r4"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R5, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1R5a"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R6, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1R5b"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R6, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r6"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R8, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r7"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R9, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r8"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B1R10, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b1r9"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B2R1, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b2r1"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B2R2, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b2r2"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B3R3C1b, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b3BlnCacah"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B3R1C1, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b3Nama"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B3R2C1, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b3nim"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, B3R3C1a, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("b3TglCacah"));
        bindingGroup.addBinding(binding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, KKS, org.jdesktop.beansbinding.ELProperty.create("${text}"), b1coba1, org.jdesktop.beansbinding.BeanProperty.create("kks"));
        bindingGroup.addBinding(binding);

        setPreferredSize(new java.awt.Dimension(1070, 1600));

        blok1231.setPreferredSize(new java.awt.Dimension(1070, 2272));

        jLayeredPane2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        B1R1.setPanel(blok1231);
        jLayeredPane2.add(B1R1, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 210, 40, 30));

        B1R2.setPanel(blok1231);
        jLayeredPane2.add(B1R2, new org.netbeans.lib.awtextra.AbsoluteConstraints(840, 255, 90, 30));

        B1R3.setPanel(blok1231);
        jLayeredPane2.add(B1R3, new org.netbeans.lib.awtextra.AbsoluteConstraints(840, 300, 90, 30));

        B1R4.setPanel(blok1231);
        jLayeredPane2.add(B1R4, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 350, 40, 30));

        B1R5.setPanel(blok1231);
        jLayeredPane2.add(B1R5, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 397, 90, 30));

        B1R6.setPanel(blok1231);
        jLayeredPane2.add(B1R6, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 445, 90, 30));

        B1R7.setPanel(blok1231);
        B1R7.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                B1R7FocusLost(evt);
            }
        });
        jLayeredPane2.add(B1R7, new org.netbeans.lib.awtextra.AbsoluteConstraints(840, 490, 90, 30));

        B1R8.setPanel(blok1231);
        jLayeredPane2.add(B1R8, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 540, 360, 30));

        B1R9.setPanel(blok1231);
        jLayeredPane2.add(B1R9, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 585, 470, 30));

        B1R10.setPanel(blok1231);
        jLayeredPane2.add(B1R10, new org.netbeans.lib.awtextra.AbsoluteConstraints(860, 650, 70, 30));

        B2R1.setPanel(blok1231);
        B2R1.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                B2R1FocusLost(evt);
            }
        });
        jLayeredPane2.add(B2R1, new org.netbeans.lib.awtextra.AbsoluteConstraints(860, 832, 70, 30));

        B2R2.setPanel(blok1231);
        jLayeredPane2.add(B2R2, new org.netbeans.lib.awtextra.AbsoluteConstraints(860, 880, 70, 30));

        B3R1C1.setPanel(blok1231);
        jLayeredPane2.add(B3R1C1, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 1044, 290, 30));

        B3R1C2.setPanel(blok1231);
        jLayeredPane2.add(B3R1C2, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 1044, 270, 30));

        B3R2C1.setPanel(blok1231);
        jLayeredPane2.add(B3R2C1, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 1082, 140, 30));

        B3R2C2.setPanel(blok1231);
        jLayeredPane2.add(B3R2C2, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 1080, 140, 30));

        B3R3C1a.setPanel(blok1231);
        jLayeredPane2.add(B3R3C1a, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 1119, 40, 30));

        B3R3C1b.setPanel(blok1231);
        jLayeredPane2.add(B3R3C1b, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 1119, 40, 30));

        B3R3C2a.setPanel(blok1231);
        jLayeredPane2.add(B3R3C2a, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 1119, 40, 30));

        B3R3C2b.setPanel(blok1231);
        jLayeredPane2.add(B3R3C2b, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 1119, 40, 30));

        KKS.setPanel(blok1231);
        jLayeredPane2.add(KKS, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 1220, 140, 30));

        javax.swing.GroupLayout blok1231Layout = new javax.swing.GroupLayout(blok1231);
        blok1231.setLayout(blok1231Layout);
        blok1231Layout.setHorizontalGroup(
            blok1231Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1070, Short.MAX_VALUE)
            .addGroup(blok1231Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, blok1231Layout.createSequentialGroup()
                    .addGap(0, 70, Short.MAX_VALUE)
                    .addComponent(jLayeredPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 1000, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        blok1231Layout.setVerticalGroup(
            blok1231Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1480, Short.MAX_VALUE)
            .addGroup(blok1231Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, blok1231Layout.createSequentialGroup()
                    .addGap(0, 170, Short.MAX_VALUE)
                    .addComponent(jLayeredPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 1310, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(blok1231, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(blok1231, javax.swing.GroupLayout.PREFERRED_SIZE, 1480, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        bindingGroup.bind();
    }// </editor-fold>//GEN-END:initComponents

    private void B1R7FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_B1R7FocusLost
        // TODO add your handling code here:
        KKS.setText(B1R1.getText() + B1R2.getText() + B1R3.getText() + B1R4.getText() + B1R5.getText() + B1R6.getText() + B1R7.getText());
    }//GEN-LAST:event_B1R7FocusLost

    private void B2R1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_B2R1FocusLost
        // TODO add your handling code here:
        Blok4.setJumlahPekerja(Integer.parseInt(B2R1.getText()));
        DataEntriPekerjaanPanel.setJumlahPekerja(Integer.parseInt(B2R1.getText()));
    }//GEN-LAST:event_B2R1FocusLost


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private pkl53.component.TextField B1R1;
    private pkl53.component.TextField B1R10;
    private pkl53.component.TextField B1R2;
    private pkl53.component.TextField B1R3;
    private pkl53.component.TextField B1R4;
    private pkl53.component.TextField B1R5;
    private pkl53.component.TextField B1R6;
    private pkl53.component.TextField B1R7;
    private pkl53.component.TextField B1R8;
    private pkl53.component.TextField B1R9;
    private pkl53.component.TextField B2R1;
    private pkl53.component.TextField B2R2;
    private pkl53.component.TextField B3R1C1;
    private pkl53.component.TextField B3R1C2;
    private pkl53.component.TextField B3R2C1;
    private pkl53.component.TextField B3R2C2;
    private pkl53.component.TextField B3R3C1a;
    private pkl53.component.TextField B3R3C1b;
    private pkl53.component.TextField B3R3C2a;
    private pkl53.component.TextField B3R3C2b;
    private pkl53.component.TextField KKS;
    private static pkl53.model.B1coba b1coba1;
    private pkl53.imageClass.Blok123 blok1231;
    private javax.swing.JLayeredPane jLayeredPane2;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the em
     */
    public EntityManager getEm() {
        return em;
    }

    /**
     * @return the B1R1
     */
    public pkl53.component.TextField getB1R1() {
        return B1R1;
    }

    /**
     * @return the B1R10
     */
    public pkl53.component.TextField getB1R10() {
        return B1R10;
    }

    /**
     * @return the B1R2
     */
    public pkl53.component.TextField getB1R2() {
        return B1R2;
    }

    /**
     * @return the B1R3
     */
    public pkl53.component.TextField getB1R3() {
        return B1R3;
    }

    /**
     * @return the B1R4
     */
    public pkl53.component.TextField getB1R4() {
        return B1R4;
    }

    /**
     * @return the B1R5
     */
    public pkl53.component.TextField getB1R5() {
        return B1R5;
    }

    /**
     * @return the B1R6
     */
    public pkl53.component.TextField getB1R6() {
        return B1R6;
    }

    /**
     * @return the B1R7
     */
    public pkl53.component.TextField getB1R7() {
        return B1R7;
    }

    /**
     * @return the B1R8
     */
    public pkl53.component.TextField getB1R8() {
        return B1R8;
    }

    /**
     * @return the B1R9
     */
    public pkl53.component.TextField getB1R9() {
        return B1R9;
    }

    /**
     * @return the B2R1
     */
    public pkl53.component.TextField getB2R1() {
        return B2R1;
    }

    /**
     * @return the B2R2
     */
    public pkl53.component.TextField getB2R2() {
        return B2R2;
    }

    /**
     * @return the B3R1C1
     */
    public pkl53.component.TextField getB3R1C1() {
        return B3R1C1;
    }

    /**
     * @return the B3R1C2
     */
    public pkl53.component.TextField getB3R1C2() {
        return B3R1C2;
    }

    /**
     * @return the B3R2C1
     */
    public pkl53.component.TextField getB3R2C1() {
        return B3R2C1;
    }

    /**
     * @return the B3R2C2
     */
    public pkl53.component.TextField getB3R2C2() {
        return B3R2C2;
    }

    /**
     * @return the B3R3C1a
     */
    public pkl53.component.TextField getB3R3C1a() {
        return B3R3C1a;
    }

    /**
     * @return the B3R3C1b
     */
    public pkl53.component.TextField getB3R3C1b() {
        return B3R3C1b;
    }

    /**
     * @return the B3R3C2a
     */
    public pkl53.component.TextField getB3R3C2a() {
        return B3R3C2a;
    }

    /**
     * @return the B3R3C2b
     */
    public pkl53.component.TextField getB3R3C2b() {
        return B3R3C2b;
    }

    /**
     * @return the blok1231
     */
    public pkl53.imageClass.Blok123 getBlok1231() {
        return blok1231;
    }

}
